<?php

namespace App\Models\CarModels;

use Illuminate\Database\Eloquent\Model;
use QCod\ImageUp\HasImageUploads;
class CarEquipment extends Model
{
    //
    protected $table = 'equipments';
    protected $fillable = ['name','number','brand','kind_id','car_id','custom'];

    public function kind()
    {
        return $this->belongsTo(CarEquipmentKind::class,'kind_id','id');
    }


    public function car()
    {
        return $this->belongsTo(CarInfo::class,'car_id','id')->with('kind');
    }


}
